package com.gbiac.modules.monitor.service;

import com.gbiac.modules.monitor.model.dto.AIDeviceCallbackAFRParamDTO;
import com.gbiac.modules.monitor.model.dto.AiDeviceCallbackAFRResponseDTO;
import com.gbiac.modules.monitor.model.dto.AiDeviceCameraRelationDTO;
import com.gbiac.modules.monitor.model.form.AiWarnMessageForm;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface AiDeviceService {

    /**
     * 添加AI告警信息
     * @param aiWarnMessageForm
     */
    void addAiWarnMessage(AiWarnMessageForm aiWarnMessageForm);

    /**
     * 开启摄像头
     * @param cameraCode
     * @return 是否成功打开摄像头
     */
    public Boolean openAiDevice(String cameraCode);
//    /**
//     * 关闭摄像头
//     * @param cameraCode
//     * @return 是否成功关闭摄像头
//     */
//    public Boolean closeAiDevice(String cameraCode);

    /**
     * 人脸识别结果回调
     * @param aiDeviceCallbackAFRParamDTO
     * @return 人脸识别结果
     */
    Object callbackAFR(AIDeviceCallbackAFRParamDTO aiDeviceCallbackAFRParamDTO);
    /**
     * 新增人员
     * @param loginUser 用户ID
     * @return
     */
    Result<String> addPersonAIDevice(LoginUser loginUser);
    /**
     * 删除人员
     * @param id 用户ID
     * @return
     */
    Result<String> deletePersonAIDevice(String id);
    /**
     * 批量新增人员
     * @param loginUserList 用户ID
     * @return
     */
    Result<String> batchAddPersonAIDevice(List<LoginUser> loginUserList);

    /**
     * 开启行为检测
     * @param aiDeviceCameraRelationDTO
     * @return
     */
    public Boolean openCameraTask(AiDeviceCameraRelationDTO aiDeviceCameraRelationDTO);


    /**
     * 关闭行为检测
     * @param cameraCode
     * @return
     */
    public Boolean closeCameraTask(String cameraCode);

    public Boolean checkRule(AiWarnMessageForm aiWarnMessageForm);
}
